let express =require("express")
let app=express()

// 后端设置跨域
app.use(function (req, res, next) { 
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Content-Type, Content.length, Authorization');
    res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, OPTIONS, DELETE');
    next();
})

let charOne=require('./router/one')
let charTwo=require('./router/two')
let charThree=require('./router/three')
let charFour=require('./router/four')
let charFive=require('./router/five')

app.use('/one',charOne)
app.use('/two',charTwo)
app.use('/three',charThree)
app.use('/four',charFour)
app.use('/five',charFive)
app.listen(80, () => {
    console.log('服务器启动成功');
})